package cn.chenxinjie.hrm.constant;

public enum CourseLevel {

    BRONZE(1L,"青铜"),
    SLIVER(2L,"白银"),
    GOLD(3L,"黄金"),
    PLATINUM(4L,"铂金"),
    DIAMOND(5L,"钻石");

    private Long id;
    private String name;

    CourseLevel(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public static CourseLevel checkLevel(Long id, String name){
        CourseLevel[] levels = CourseLevel.values();
        for (CourseLevel level:levels){
            if (level.getId().equals(id) && level.getName().equals(name)) {
                return level;
            }
        }
        return null;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
